from django.shortcuts import render

# Create your views here.

from webadmin.views_dir.mongo_oper import get_db_obj


def index(request):

    articles_objs = get_db_obj().articles.find({"show": 1}).sort([["create_date", -1]]).limit(10)

    return render(request, 'web/index.html', locals())